<?php

namespace Biz\Criteria\Site\Order;

use Biz\Constants\Site\SiteOrderConstants;
use Lumen\Repository\Contracts\CriterionContract;

/**
 * RegistrationFeeFilterCriterion.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class RegistrationFeeFilterCriterion implements CriterionContract
{
    /**
     * Apply current criterion to the given query and return query.
     *
     * @param \Illuminate\Database\Eloquent\Model            $model
     * @param \Lumen\Repository\Contracts\RepositoryContract $repository
     *
     * @return \Illuminate\Database\Eloquent\Model
     */
    public function apply($model, $repository)
    {
        $model = $model->where('type', '=', SiteOrderConstants::TYPE_REGISTRATION_FEE);

        return $model;
    }
}
